#!/bin/bash

# Test that the Python interface of QUACreduce works.
#
# Copyright (c) Los Alamos National Security, LLC, and others.

. ./environment.sh

cd $DATADIR


## Set up input

y "echo -e 'foo bar baz\nfoo foo' > foo1.txt"
y "echo -e 'bar' > foo2.txt"
y "cat foo*.txt"


## Do map-reduce

y "quacreduce --python qr.wordcount.Job --pyargs 'factor:2' foo*.txt"
x make --quiet  # output contains temp dirs that vary
y "cat out/* | sort"
